<template>
  <div class="container">
    <div class="box">
      <header class="header">
        <van-icon style="font-size:32px" name="wap-nav" />
        <img src="./assets/a1.jpg" alt />
        <van-icon style="font-size:32px" name="search" />
        <van-icon style="font-size:32px" name="contact-o" />
      </header>
      <div class="content">
        <van-swipe :autoplay="3000" lazy-render>
          <van-swipe-item v-for="image in images" :key="image">
            <img style="width:100%;height:220px" :src="image" />
          </van-swipe-item>
        </van-swipe>
        <van-grid>
          <van-grid-item icon="photo-o" text="文字" />
          <van-grid-item icon="photo-o" text="文字" />
          <van-grid-item icon="photo-o" text="文字" />
          <van-grid-item icon="photo-o" text="文字" />
        </van-grid>
        <van-grid>
          <van-grid-item icon="photo-o" text="文字" />
          <van-grid-item icon="photo-o" text="文字" />
          <van-grid-item icon="photo-o" text="文字" />
          <van-grid-item icon="photo-o" text="文字" />
        </van-grid>
      </div>
    </div>
    <footer class="footer">
      <div class="bbq">
        <img style="width:30%;height:40px" src="./assets/c1.jpg" alt />
        <span>距离本场结束08：24：29</span>
        <span>更多场次</span>
      </div>
      <ul>
        <li v-for="item in list" :key="item.id">
          <div class="kkl">
           <van-image :src="item.image" lazy-load />
           <p>{{item.title}}</p>
          </div>
        </li>
      </ul>
    </footer>
  </div>
</template>
<script setup>
const images = [
  "https://fastly.jsdelivr.net/npm/@vant/assets/apple-1.jpeg",
  "https://fastly.jsdelivr.net/npm/@vant/assets/apple-2.jpeg"
];
import { ref } from "vue";
const list = ref([
  {
    id: 1,
    image: require("./assets/tu1.jpg"),
    title: "充客Type-C接口耳机"
  },
  {
    id: 2,
    image: require("./assets/tu1.jpg"),
    title: "充客Type-C接口耳机"
  },
  {
    id: 3,
    image: require("./assets/tu1.jpg"),
    title: "充客Type-C接口耳机"
  },
]);
</script>
<style lang="scss">
* {
  padding: 0;
  margin: 0;
  list-style: none;
}
html,
body,
#app,
.container {
  width: 100%;
  height: 94%;
}
.container {
  display: flex;
  flex-direction: column;
  background: #efefef;
  .box {
    flex: 1;
    overflow: auto;
    display: flex;
    flex-direction: column;
    .header {
      height: 50px;
      background: #fff;
      display: flex;
      justify-content: space-evenly;
      align-items: center;
      padding: 10px 0;
    }
    .content {
      flex: 1;
      overflow: auto;
    }
  }
  .footer {
    height: 50px;
    .bbq {
        background: #fff;
        display: flex;
        justify-content: space-evenly;
        align-items: center;
        margin-bottom: 10px;
      }
      ul{
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 10px;
        img{
          width: 100%;
          height: 120px;
        }
        .kkl{
          margin: 4px;
        }
      }
  }
}
</style>
